current_dir = $(shell pwd)
enable_warnings = -W -Wall -Wextra -pedantic
SRC_CXX = src/*.cpp

all:
	g++ -std=c++0x -I/home/akoszar/Workspace/gtest-1.7.0/include -pthread testuje.cpp libgtest.a -o test_executable
	./test_executable

test:
	rm -rf $(current_dir)/bin
	mkdir -p $(current_dir)/bin
	g++ $(enable_warnings) -std=c++0x -I$(current_dir) -pthread testing/ut_server.cpp libgtest.a -o bin/test_exec1
	g++ $(enable_warnings) -std=c++0x -I$(current_dir) -pthread testing/ut_message.cpp libgtest.a -o bin/test_exec2
	g++ $(enable_warnings) -std=c++0x -I$(current_dir) $(SRC_CXX) -pthread testing/ut_message_receiver.cpp libgtest.a -o bin/test_exec3
	g++ $(enable_warnings) -std=c++0x -I$(current_dir) $(SRC_CXX) -pthread testing/ut_message_buffer.cpp  libgtest.a -o bin/test_exec4
	./bin/test_exec1
	./bin/test_exec2
	./bin/test_exec3
	./bin/test_exec4


proto_gen:
	protoc --proto_path=$(current_dir)/proto/ $(current_dir)/proto/information.proto --cpp_out=$(current_dir)/proto/ 
